﻿using System;

namespace NetTopologySuite.Index.Sweepline
{
	public class SweepLineInterval
	{
		public SweepLineInterval(double min, double max) : this(min, max, null)
		{
		}

		public SweepLineInterval(double min, double max, object item)
		{
			this.min = ((min < max) ? min : max);
			this.max = ((max > min) ? max : min);
			this.item = item;
		}

		public double Min
		{
			get
			{
				return this.min;
			}
		}

		public double Max
		{
			get
			{
				return this.max;
			}
		}

		public object Item
		{
			get
			{
				return this.item;
			}
		}

		private readonly double min;

		private readonly double max;

		private readonly object item;
	}
}
